<template>
  <div class="item-component">
    <span>{{ num }}</span>
    <button @click="num += 1">+</button>
    <button @click="jian">-</button>
  </div>
</template>

<script>
export default {
  name: "ItemComponent",
  data() {
    return {
      num: 100
    }
  },
  methods: {
    jian() {
      this.num -= 1
    }
  }
}
</script>

<style scoped>

</style>